<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/10/28 0028
 * Time: 16:21
 */
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\LinkPager;

?>

<!DOCTYPE html>
<html>
<head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="renderer" content="webkit" />
    <title>mings 的个人主页 - Ghost中文网</title
    <base href="http://wenda.ghostchina.com/" /><!--[if IE]></base><![endif]-->
    <link href="http://wenda.ghostchina.com/static/css/default/ico/favicon.ico?v=20140930" rel="shortcut icon" type="image/x-icon" />

    <link rel="stylesheet" type="text/css" href="http://wenda.ghostchina.com/static/css/bootstrap.css" />
<!--    <link rel="stylesheet" type="text/css" href="http://wenda.ghostchina.com/static/css/icon.css" />-->

    <link href="http://wenda.ghostchina.com/static/css/default/common.css?v=20140930" rel="stylesheet" type="text/css" />
    <link href="http://wenda.ghostchina.com/static/css/default/link.css?v=20140930" rel="stylesheet" type="text/css" />
    <link href="http://wenda.ghostchina.com/static/js/plug_module/style.css?v=20140930" rel="stylesheet" type="text/css" />
    <link href="http://wenda.ghostchina.com/static/css/default/user.css?v=20140930" rel="stylesheet" type="text/css" />
    <script src="./js/jquery-1.5.2.min.js"></script>
    <script type="text/javascript">
        function addfriend() {
            $.ajax({
                type: "POST",
                url: "<?php echo Url::to(['user/add-friend'])?>",
                dataType:"json",
                data: {regname: $("#regname").val()},
                'success': function(json)
                {
                    if(json.status) {

                        window.location.href="?r=user/center";
                    }else{
                        alert(json.msg);
                    }
                }
            });
        }
    </script>
    <script type="text/javascript" src="http://wenda.ghostchina.com/static/js/compatibility.js"></script>
    <!--[if lte IE 8]>
    <script type="text/javascript" src="http://wenda.ghostchina.com/static/js/respond.js"></script>
    <![endif]-->
</head>
<noscript unselectable="on" id="noscript">
    <div class="aw-404 aw-404-wrap container">
        <img src="http://wenda.ghostchina.com/static/common/no-js.jpg">
        <p>你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!</p>
    </div>
</noscript>
<body>


<div class="aw-container-wrap">
    <div class="container">
        <div class="row">
            <div class="aw-content-wrap clearfix">
                <div class="col-sm-12 col-md-9 aw-main-content">
                    <!-- 用户数据内容 -->
                    <div class="aw-mod aw-user-detail-box">
                        <div class="mod-head">
                            <img src="http://wenda.ghostchina.com/static/common/avatar-max-img.png" alt="mings" />
                            <span class="pull-right operate">
                                                                <a href="<?php echo Url::to(['user/information'])?>" class="btn btn-mini btn-success">编辑</a>
                                                                <a href="<?php echo Url::to(['article/publis-harticle'])?>" class="btn btn-mini btn-success">发起文章</a>
                                                            </span>
                            <?php if ($user['id'] == null){?>
                            <h1><?=Yii::$app->session->get("regname")?></h1>
                            <?php }else{?>
                            <span class="pull-right operate">
                                    <a href="" onclick="addfriend()" class="btn btn-mini btn-success">添加好友</a>
                                </span>
                                <input type="hidden"  id="regname" value="<?=Html::encode("{$user['regname']}")?>"/>
                                <h1><?=Html::encode("{$user['regname']}")?></h1>
                            <?php }?>
                            <p class="text-color-999"></p>
                            <p class="aw-user-flag">
                            </p>
                        </div>
                        <div class="mod-body">
                            <div class="meta">
                                <span><i class="icon icon-agree"></i> 赞同 : <em class="aw-text-color-orange">0</em></span>
                                <span><i class="icon icon-thank"></i> 感谢 : <em class="aw-text-color-orange">0</em></span>
                            </div>

                        </div>
                        <div class="mod-footer">
                            <ul class="nav nav-tabs aw-nav-tabs">
                                <li class="active"><a href="#overview" id="page_overview" data-toggle="tab">概述</a></li>
                                <li><a href="#questions" id="page_questions" data-toggle="tab">文章<span class="badge">0</span></a></li>
                                <li><a href="#answers" id="page_answers" data-toggle="tab">回复<span class="badge">0</span></span></a></li>
<!--                                <li><a href="#articles" id="page_articles" data-toggle="tab">文章</a></li>-->
                                <li><a href="#focus" id="page_focus" data-toggle="tab">关注</a></li>
                                <li><a href="#actions" id="page_actions" data-toggle="tab">动态</a></li>
                                <li><a href="#detail" id="page_detail" data-toggle="tab">详细资料</a></li>
                            </ul>
                        </div>
                    </div>
                    <!-- end 用户数据内容 -->

                    <div class="aw-user-center-tab">
                        <div class="tab-content">
                            <div class="tab-pane active" id="overview">
                                <!-- 回复 -->
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3><a class="pull-right aw-more-content" href="#" onclick="$('#page_answers').click();">更多 »</a>回复</h3>
                                    </div>
                                    <div class="mod-body">
                                        <div class="aw-profile-answer-list">
                                            <p class="padding10 text-center">没有内容</p>
                                        </div>
                                    </div>
                                </div>
                                <!-- end 回复 -->

                                <!-- 发问 -->
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3><a class="pull-right aw-more-content" href="javascript:;" onclick="$('#page_questions').click();">更多 »</a>文章</h3>
                                    </div>
                                    <div class="mod-body">
                                        <div class="aw-profile-publish-list">
                                            <?php if ($articleall == null){?>
                                                <p class="padding10 text-center">没有内容</p>
                                            <?php }?>
                                            <ul>
                                                <?php foreach ($articleall as $country): ?>
                                                    <li>
                                                        <a href="#" style="display:block; text-align:center"><?=Html::encode(" {$country->title}")?>;</a>
                                                    </li>
                                                <?php endforeach; ?>
                                            </ul>
                                            <?= LinkPager::widget(['pagination' => $pagination]) ?>


                                        </div>
                                    </div>
                                </div>
                                <!-- end 发问 -->

                                <!-- 最新动态 -->
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3><a class="pull-right aw-more-content" href="javascript:;" onclick="$('#page_actions').click();">更多 »</a>动态</h3>
                                    </div>
                                    <div class="mod-body">
                                        <ul>
                                            <p class="padding10 text-center">没有内容</p>
                                        </ul>
                                    </div>
                                </div>
                            </div>

                            <div class="tab-pane" id="answers">
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3>回复</h3>
                                    </div>
                                    <div class="mod-body">
                                        <div class="aw-profile-answer-list" id="contents_user_actions_answers">

                                        </div>
                                    </div>
                                    <div class="mod-footer">
                                        <!-- 加载更多内容 -->
                                        <a class="aw-load-more-content" id="bp_user_actions_answers_more">
                                            <span>更多</span>
                                        </a>
                                        <!-- end 加载更多内容 -->
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="articles">
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3>文章</h3>
                                    </div>
                                    <div class="mod-body">
                                        <div class="aw-profile-publish-list" id="contents_user_actions_articles"></div>
                                    </div>
                                    <div class="mod-footer">
                                        <!-- 加载更多内容 -->
                                        <a class="aw-load-more-content" id="bp_user_actions_articles_more">
                                            <span>更多</span>
                                        </a>
                                        <!-- end 加载更多内容 -->
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="focus">
                                <!-- 自定义切换 -->
                                <div class="aw-mod">
                                    <div class="aw-tabs text-center">
                                        <ul>
                                            <li class="active"><a>关注的人</a></li>
                                            <li><a>关注者</a></li>
                                            <li><a>关注的话题</a></li>
                                        </ul>
                                    </div>
                                    <div class="mod-body">
                                        <div class="aw-tab-content">
                                            <div class="aw-mod aw-user-center-follow-mod">
                                                <div class="mod-body">
                                                    <ul id="contents_user_follows" class="clearfix"></ul>
                                                </div>
                                                <div class="mod-footer">
                                                    <!-- 加载更多内容 -->
                                                    <a class="aw-load-more-content" id="bp_user_follows_more">
                                                        <span>更多</span>
                                                    </a>
                                                    <!-- end 加载更多内容 -->
                                                </div>
                                            </div>
                                            <div class="aw-mod aw-user-center-follow-mod hide">
                                                <div class="mod-body">
                                                    <ul class="clearfix" id="contents_user_fans"></ul>
                                                </div>
                                                <div class="mod-footer">
                                                    <!-- 加载更多内容 -->
                                                    <a class="aw-load-more-content" id="bp_user_fans_more">
                                                        <span>更多</span>
                                                    </a>
                                                    <!-- end 加载更多内容 -->
                                                </div>
                                            </div>
                                            <div class="aw-mod aw-user-center-follow-mod hide">
                                                <div class="mod-body">
                                                    <ul id="contents_user_topics" class="clearfix"></ul>
                                                </div>
                                                <div class="mod-footer">
                                                    <!-- 加载更多内容 -->
                                                    <a class="aw-load-more-content" id="bp_user_topics_more">
                                                        <span>更多</span>
                                                    </a>
                                                    <!-- end 加载更多内容 -->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- end 自定义切换 -->
                            </div>
                            <div class="tab-pane" id="actions">
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3>最新动态</h3>
                                    </div>
                                    <div class="mod-body">
                                        <div id="contents_user_actions"></div>
                                    </div>
                                    <div class="mod-footer">
                                        <!-- 加载更多内容 -->
                                        <a class="aw-load-more-content" id="bp_user_actions_more">
                                            <span>更多</span>
                                        </a>
                                        <!-- end 加载更多内容 -->
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="detail">
                                <div class="aw-mod">
                                    <div class="mod-head">
                                        <h3>详细资料</h3>
                                    </div>
                                    <div class="mod-body aw-user-center-details">
                                        <dl>
                                            <dt><span>个人成就:</span></dt>
                                            <dd>
                                                <p class="meta">
                                                    <span><i class="icon icon-prestige"></i>威望: <em class="aw-text-color-green">0</em></span>
                                                    <span><i class="icon icon-agree"></i>赞同: <em class="aw-text-color-orange">0</em></span>
                                                    <span><i class="icon icon-thank"></i>感谢: <em class="aw-text-color-orange">0</em></span>
                                                </p>
                                            </dd>
                                        </dl>



                                        <dl>
                                            <dt><span>最后活跃:</span></dt>
                                            <dd>31 秒前</dd>
                                        </dl>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 侧边栏 -->
                <div class="col-sm-12 col-md-3 aw-side-bar">
                    <div class="aw-mod people-following">
                        <div class="mod-body">
                            <a onclick="$('#page_focus').click();$('#focus .aw-tabs ul li').eq(0).click();$.scrollTo($('#focus').offset()['top'], 600, {queue:true})" class="pull-right font-size-12">更多 »</a>
                            <span>
                                关注 <em class="aw-text-color-blue">0</em> 人                            </span>
                        </div>
                    </div>
                    <div class="aw-mod people-following">
                        <div class="mod-body">
                            <a onclick="$('#page_focus').click();$('#focus .aw-tabs ul li').eq(1).click();$.scrollTo($('#focus').offset()['top'], 600, {queue:true})" class="pull-right font-size-12">更多 »</a>
                            <span>
                                被 <em class="aw-text-color-blue">0</em> 人关注                            </span>

                        </div>

                    </div>
                    <div class="aw-mod people-following">
                        <div class="mod-body">
                            关注 <em class="aw-text-color-blue">0</em> 话题                                                    </div>
                    </div>
                    <div class="aw-mod">
                        <div class="mod-body">
                            <span class="aw-text-color-666">
                                主页访问量 : 1 次访问                            </span>
                        </div>
                    </div>
                    <div class="aw-mod">
                        <div class="mod-body">
                            <?php if ($friend != null){ ?>
                            <span class="aw-text-color-666">
                               我的好友：</span>
                            <ul>
                                <?php foreach ($friend as $fr): ?>
                                    <li>
                                        <a href="index.php?r=user/friend&regname=<?=Html::encode("{$fr['name']}")?>" style="display:block; text-align:center"><?=Html::encode(" {$fr['name']}")?></a>
                                    </li>
                                <?php endforeach; ?>
                            </ul>
                            <?php }?>
                        </div>
                    </div>
                </div>
                <!-- end 侧边栏 -->
            </div>
        </div>
    </div>
</div>



</body>
</html>
